﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace EssenceAnalytics.Core.Interfaces
{
    public interface IRepository<T>
    {
        T Get(int id);
        IEnumerable<T> GetAll();
        IEnumerable<T> Where(Expression<Func<T, bool>> predicate, bool showDeleted = false);
        T Insert(T o);
        void Save();
        void Delete(T o);
        void Restore(T o);
    }

    public interface IDelRepository<T>
    {
        IEnumerable<T> Where(Expression<Func<T, bool>> predicate, bool showDeleted = false);
        IEnumerable<T> GetAll();
        void Restore(T o);
    }
}